package com.cy.service.impl;

import com.cy.dao.NoticeLogDao;
import com.cy.pojo.NoticeLog;
import com.cy.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LogServiceImpl implements LogService {

    @Autowired
    private NoticeLogDao noticeLogDao;

    @Async
    @Override
    public void insertLog(NoticeLog noticeLog) {
        noticeLogDao.insertLog(noticeLog);
    }

    @Override
    public List<NoticeLog> selectLogs(NoticeLog noticeLog) {
        return noticeLogDao.selectLogs(noticeLog);
    }

    @Override
    public int deleteLogs(List<Integer> ids) {
        return noticeLogDao.deleteLogs(ids);
    }

    @Override
    public NoticeLog selectLog(Integer id) {
        return noticeLogDao.selectLog(id);
    }
}
